#ifndef _SHARPSDL_H__
#define __SHARPSDL_H__

#pragma once

using namespace System;

namespace SharpSDL
{
	public enum class SDLInitReturn
	{
		Failure = -1,
		Success = 0
	};

	public ref class SDL
	{
	public:
		ref class ApplicationStatus
		{
		public:
			static int AppStatus(void);
			static bool AppMouseFocus(void);
			static bool AppInputFocus(void);
			static bool AppActive(void);
		};
		enum class SDLQuitFlags
		{
			Timer = 0x00000001,
			Audio = 0x00000010,
			Video = 0x00000020,
			Joystick = 0x00000200,
			CDROM = 0x00000100
		};
		enum class SDLInitFlags
		{
			Timer = 0x00000001,
			Audio = 0x00000010,
			Video = 0x00000020,
			Joystick = 0x00000200,
			CDROM = 0x00000100,
			NOPARACHUTE = 0x00100000,
			VENTTHREAD = 0x01000000,
			EVERYTHING = 0x0000FFFF
		};
		static SharpSDL::SDLInitReturn Init(SDLInitFlags flags);
		static SharpSDL::SDLInitReturn InitSubSystem(SDLInitFlags flags);
		static void QuitSubSystem(SDLQuitFlags flags);
		static void Quit(void);
		ref class Error
		{
		public:
			enum class ErrorCode
			{
				NOERRORS = -1,
				ENOMEM = SDL_ENOMEM,
				EFREAD = SDL_EFREAD,
				EFWRITE = SDL_EFWRITE,
				EFSEEK = SDL_EFSEEK,
				UNSUPPORTED = SDL_UNSUPPORTED,
				LASTERROR = SDL_LASTERROR,
				CDROMERROR,
				AUDIO,
			};
			static char* GetLastError(void);
			static void SetError(ErrorCode error);
			static void ClearError(void);	
		};
	};
}

#endif
